import request from '@/utils/request'

// 查询航线列表列表
export function listPlans(query) {
    return request({
        url: '/flightplans/plans/list',
        method: 'get',
        params: query
    })
}

// 查询航线列表详细
export function getPlans(fpId) {
    return request({
        url: '/flightplans/plans/' + fpId,
        method: 'get'
    })
}

// 新增航线列表
export function addPlans(data) {
    return request({
        url: '/flightplans/plans',
        method: 'post',
        data: data
    })
}
// 导入航线列表
export function addUpload(data) {
    return request({
        url: '/flightplans/plans/upload',
        method: 'post',
        data: data,
        timeout:100000
    })
}

// 修改航线列表
export function updatePlans(data) {
    return request({
        url: '/flightplans/plans',
        method: 'put',
        data: data
    })
}

// 删除航线列表
export function delPlans(fpId) {
    return request({
        url: '/flightplans/plans/' + fpId,
        method: 'delete'
    })
}
